package com.wicket.okrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.TargetCalcService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrapp.integration.FwAppAchievementClient;
import com.wicket.okrapp.integration.dto.AddAchievementDockingBusinessHandleComRespDto;
import com.wicket.okrapp.integration.dto.AddAchievementDockingBusinessHandleComReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrapp.integration.FwAppTargetCalcClient;
import com.wicket.okrapp.integration.dto.ImplementToBeReportedTaskStandardDataAndTipsComRespDto;
import com.wicket.okrapp.integration.dto.ImplementToBeReportedTaskStandardDataAndTipsComReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffAccountSubjectDto;
import java.util.stream.Collectors;
import com.wicket.okrapp.integration.dto.QueryReportTaskStandardDataAndElementTipsDetailComRespDto;
import com.wicket.okrapp.integration.dto.QueryReportTaskStandardDataAndElementTipsDetailComReqDto;
import com.wicket.okrapp.integration.dto.QueryReportAccountSubjectEtcInfoListComRespDto;
import com.wicket.okrapp.integration.dto.QueryReportAccountSubjectEtcInfoListComReqDto;
import com.wicket.okrapp.integration.dto.QueryReportTaskSingleKrStdDataDetailComRespDto;
import com.wicket.okrapp.integration.dto.QueryReportTaskSingleKrStdDataDetailComReqDto;
import com.wicket.okrapp.integration.FwAppTimingTaskClient;
import com.wicket.okrapp.integration.dto.BatchRefreshTargetContentDeviationDaysEtcComRespDto;
import com.wicket.okrapp.integration.dto.BatchRefreshTargetContentDeviationDaysEtcComReqDto;
import com.wicket.okrapp.integration.dto.RefreshAllStageCurrentCycleComRespDto;
import com.wicket.okrapp.integration.dto.RefreshAllStageCurrentCycleComReqDto;
import com.wicket.okrcomponent.integration.FwCompInterfaceModeClient;
import com.wicket.okrcomponent.integration.dto.GenerateDataObjectBatchCodeComRespDto;
import com.wicket.okrcomponent.integration.dto.GenerateDataObjectBatchCodeComReqDto;
import com.wicket.okrcomponent.integration.FwCompTargetCalcClient;
import com.wicket.okrcomponent.integration.dto.ImplementPrepareTargetReachedCalcConfComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementPrepareTargetReachedCalcConfComReqDto;
import com.wicket.okrcalc.integration.FwCalcStandardDataClient;
import com.wicket.okrcalc.integration.dto.ImplementParentSubMidCycleTypeAnalysisComRespDto;
import com.wicket.okrcalc.integration.dto.ImplementParentSubMidCycleTypeAnalysisComReqDto;
import com.wicket.okrapp.integration.dto.ImplementBrushFullTempTargetReachedRespDto;
import com.wicket.okrapp.integration.dto.ImplementBrushFullTempTargetReachedReqDto;
import com.wicket.okrapp.integration.FwAppEvaCalcClient;
import com.wicket.okrapp.integration.dto.ImplementSucReportTaskElementAnalyzeComRespDto;
import com.wicket.okrapp.integration.dto.ImplementSucReportTaskElementAnalyzeComReqDto;
import com.wicket.okrapp.integration.dto.ImplementReportDataQualityOperationElementComRespDto;
import com.wicket.okrapp.integration.dto.ImplementReportDataQualityOperationElementComReqDto;
import com.wicket.okrcalc.integration.FwCalcTargetCalcClient;
import com.wicket.okrcalc.integration.dto.CycleCalculateExaReportTaskAndCalcCurAndAnceStdDataComRespDto;
import com.wicket.okrcalc.integration.dto.CycleCalculateExaReportTaskAndCalcCurAndAnceStdDataComReqDto;
import com.wicket.okrapp.integration.dto.ImplementExaReportTaskAndCalcCurAndAnceStdDataComRespDto;
import com.wicket.okrapp.integration.dto.ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "TargetCalc", tags = { "TargetCalc" })
@RestController
// @RequestMapping("/oms/targetCalc/")
public class TargetCalcController {

  @Autowired
  TargetCalcService targetCalcService;
/**
   * B3执行对接成果增指标实际值
   * gen by moon at 4/6/2024, 11:34:12 AM
   */
    @PostMapping("/oms/targetCalc/implementDockAchievementObjectiveActual")
    @ApiOperation(value = "B3执行对接成果增指标实际值", response = OkrResult.class)
    public OkrResult<BffImplementDockAchievementObjectiveActualRespDto> implementDockAchievementObjectiveActual(@RequestBody(required=false) @Validated BffImplementDockAchievementObjectiveActualReqDto reqDTO){
        return OkrResult.success(targetCalcService.implementDockAchievementObjectiveActual(reqDTO));
    }
/**
   * B3查询待汇报任务标准数据及提示文案
   * gen by moon at 4/8/2024, 11:16:33 PM
   */
    @PostMapping("/oms/targetCalc/queryToBeReportedTaskStandardDataAndTipsDetail")
    @ApiOperation(value = "B3查询待汇报任务标准数据及提示文案", response = OkrResult.class)
    public OkrResult<BffQueryToBeReportedTaskStandardDataAndTipsDetailRespDto> queryToBeReportedTaskStandardDataAndTipsDetail(@RequestBody(required=false) @Validated BffQueryToBeReportedTaskStandardDataAndTipsDetailReqDto reqDTO){
        return OkrResult.success(targetCalcService.queryToBeReportedTaskStandardDataAndTipsDetail(reqDTO));
    }
/**
   * B3查询汇报任务标准数据及元素文案
   * gen by moon at 4/24/2024, 4:24:10 PM
   */
    @PostMapping("/oms/targetCalc/queryReportTaskStandardDataAndElementTipsDetail")
    @ApiOperation(value = "B3查询汇报任务标准数据及元素文案", response = OkrResult.class)
    public OkrResult<BffQueryReportTaskStandardDataAndElementTipsDetailRespDto> queryReportTaskStandardDataAndElementTipsDetail(@RequestBody(required=false) @Validated BffQueryReportTaskStandardDataAndElementTipsDetailReqDto reqDTO){
        return OkrResult.success(targetCalcService.queryReportTaskStandardDataAndElementTipsDetail(reqDTO));
    }
/**
   * B3查询汇报任务单KR标准数据
   * gen by moon at 5/1/2024, 9:11:43 PM
   */
    @PostMapping("/oms/targetCalc/queryReportTaskSingleKrStdDataDetail")
    @ApiOperation(value = "B3查询汇报任务单KR标准数据", response = OkrResult.class)
    public OkrResult<BffQueryReportTaskSingleKrStdDataDetailRespDto> queryReportTaskSingleKrStdDataDetail(@RequestBody(required=false) @Validated BffQueryReportTaskSingleKrStdDataDetailReqDto reqDTO){
        return OkrResult.success(targetCalcService.queryReportTaskSingleKrStdDataDetail(reqDTO));
    }
/**
   * B3执行全模板目标内容偏差天数(管理)
   * gen by moon at 5/3/2024, 11:45:59 PM
   */
    @PostMapping("/oms/mgt/targetCalc/implementAllTempTargetContDeviationDays")
    @ApiOperation(value = "B3执行全模板目标内容偏差天数(管理)", response = OkrResult.class)
    public OkrResult<BffImplementAllTempTargetContDeviationDaysRespDto> implementAllTempTargetContDeviationDays(@RequestBody(required=false) @Validated BffImplementAllTempTargetContDeviationDaysReqDto reqDTO){
        return OkrResult.success(targetCalcService.implementAllTempTargetContDeviationDays(reqDTO));
    }
/**
   * B3执行全模板执行周期当前及下一周期(管理)
   * gen by moon at 5/3/2024, 11:46:08 PM
   */
    @PostMapping("/oms/mgt/targetCalc/implementAllTempStageCurrentCycle")
    @ApiOperation(value = "B3执行全模板执行周期当前及下一周期(管理)", response = OkrResult.class)
    public OkrResult<BffImplementAllTempStageCurrentCycleRespDto> implementAllTempStageCurrentCycle(@RequestBody(required=false) @Validated BffImplementAllTempStageCurrentCycleReqDto reqDTO){
        return OkrResult.success(targetCalcService.implementAllTempStageCurrentCycle(reqDTO));
    }
/**
   * B3刷规划/OKR/绩效全模板目标达成情况
   * gen by moon at 7/7/2024, 6:35:21 PM
   */
    @PostMapping("/oms/targetCalc/implementBrushFullTempTargetReached")
    @ApiOperation(value = "B3刷规划/OKR/绩效全模板目标达成情况", response = OkrResult.class)
    public OkrResult<BffImplementBrushFullTempTargetReachedRespDto> implementBrushFullTempTargetReached(@RequestBody(required=false) @Validated BffImplementBrushFullTempTargetReachedReqDto reqDTO){
        return OkrResult.success(targetCalcService.implementBrushFullTempTargetReached(reqDTO));
    }
/**
   * B4执行审核汇报任务并计算当前及祖先标准数据
   * gen by moon at 9/26/2024, 6:51:40 PM
   */
    @PostMapping("/oms/targetCalc/implementExaReportTaskAndCalcCurAndAnceStdData")
    @ApiOperation(value = "B4执行审核汇报任务并计算当前及祖先标准数据", response = OkrResult.class)
    public OkrResult<BffImplementExaReportTaskAndCalcCurAndAnceStdDataRespDto> implementExaReportTaskAndCalcCurAndAnceStdData(@RequestBody(required=false) @Validated BffImplementExaReportTaskAndCalcCurAndAnceStdDataReqDto reqDTO){
        return OkrResult.success(targetCalcService.implementExaReportTaskAndCalcCurAndAnceStdData(reqDTO));
    }
/**
   * B3执行修正计算当前及祖先规划标准数据
   * gen by moon at 10/27/2024, 12:48:51 AM
   */
    @PostMapping("/oms/targetCalc/implementCalcCurAndAncestorPlanStandardData")
    @ApiOperation(value = "B3执行修正计算当前及祖先规划标准数据", response = OkrResult.class)
    public OkrResult<BffImplementCalcCurAndAncestorPlanStandardDataRespDto> implementCalcCurAndAncestorPlanStandardData(@RequestBody(required=false) @Validated BffImplementCalcCurAndAncestorPlanStandardDataReqDto reqDTO){
        return OkrResult.success(targetCalcService.implementCalcCurAndAncestorPlanStandardData(reqDTO));
    }
}
